﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdataAmount.aspx.cs" Inherits="UserWork_UpdataAmount" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>库存管理</title>
    <link href="../Style/MyWork.css" rel="stylesheet" />
    <style>
        /* 侧边栏样式 */
        .menus {
            list-style: none;
            padding: 0;
            margin: 0;
            transition: left 0.5s; /* 动画效果 */
            position: absolute;
            top: 100px;
            left: -200px; /* 默认隐藏 */
            bottom: 0;
            overflow-y: auto;
            float: left;
            width: 200px;
            height: 650px;
            background-color: coral;
            border-radius: 11px;
        }

            .menus li {
                padding: 3px;
            }

            .menus a {
                text-decoration: none;
                display: block;
                padding: 8px 16px;
                color: black;
            }

                .menus a:hover {
                    background-color: #555;
                    color: white;
                }
        /* 图片按钮样式 */
        .menu-toggle {
            cursor: grab;
            float: left;
        }

        .button3 {
            position: absolute;
            top: 12%;
            left: 26%;
        }

        .list {
            text-decoration: none;
        }
        /*返回按钮样式*/
        .returnbutton {
            position: absolute;
            top: 14%;
            left: 13%;
        }

        /*提交按钮*/
        .submitB {
            background-color: palevioletred;
            color: #3b82f6;
            border: none;
            cursor: pointer;
            border-radius: 8px;
            width: 100px;
            height: 45px;
            transition: 0.3s;
        }

            .submitB:hover {
                background-color: #3b82f6;
                box-shadow: 0 0 0 5px #3b83f65f;
                color: #fff;
            }
        /*返回按钮*/
        .returnbutton {
            background: #fbca1f;
            font-family: inherit;
            padding: 0.6em 1.3em;
            font-weight: 900;
            font-size: 18px;
            border: 3px solid black;
            border-radius: 0.4em;
            box-shadow: 0.1em 0.1em;
            cursor: pointer;
        }

            .returnbutton:hover {
                transform: translate(-0.05em, -0.05em);
                box-shadow: 0.15em 0.15em;
            }

            .returnbutton:active {
                transform: translate(0.05em, 0.05em);
                box-shadow: 0.05em 0.05em;
            }

        .asset-gridview {
            border-collapse: collapse;
            width: 100%;
            margin-top: 10px;
        }

            .asset-gridview th {
                background-color: #4CAF50;
                color: white;
                text-align: left;
                padding: 10px;
                height: 47px;
            }

            .asset-gridview td {
                border: 1px solid #ddd;
                padding: 10px;
                text-align: left;
                height: 47px;
            }

            .asset-gridview tr:nth-child(even) {
                background-color: #f2f2f2;
            }

            .asset-gridview tr:hover {
                background-color: #ddd;
            }

            /*上一页、下一页图片样式 */
            .asset-gridview a img {
                vertical-align: middle;
            }

        .list {
            text-decoration: none;
        }
        /*搜索框*/
        /* From Uiverse.io by alexruix */
        .Search {
            max-width: 190px;
            background-color: #f5f5f5;
            color: #242424;
            padding: .15rem .5rem;
            min-height: 40px;
            border-radius: 4px;
            outline: none;
            border: none;
            line-height: 1.15;
            box-shadow: 0px 10px 20px -18px;
            position: absolute;
            top: 14%;
            left: 23%;
        }

            .Search:focus {
                border-bottom: 2px solid #5b5fc7;
                border-radius: 4px 4px 2px 2px;
            }

            .Search:hover {
                outline: 1px solid lightgrey;
            }

        .btn {
            width: 130px;
            height: 44.78px;
            font-size: 1.1em;
            cursor: pointer;
            background-color: #171717;
            color: #fff;
            border: none;
            border-radius: 5px;
            transition: all .4s;
            position: absolute;
            top: 14%;
            left: 34.4%;
        }

            .btn:hover {
                border-radius: 5px;
                transform: translateY(-10px);
                box-shadow: 0 7px 0 -2px #f85959, 0 15px 0 -4px #39a2db, 0 16px 10px -3px #39a2db;
            }

            .btn:active {
                transition: all 0.2s;
                transform: translateY(-5px);
                box-shadow: 0 2px 0 -2px #f85959, 0 8px 0 -4px #39a2db, 0 12px 10px -3px #39a2db;
            }

        /* 入库出库表格样式类 */
        .table-form {
            width: 320px;
            border-collapse: collapse;
            margin-top: 20px;
        }

        /* 行样式类 */
        .table-row {
            background-color: #f2f2f2;
            border-bottom: 1px solid #ddd;
        }

        .table-row-alt {
            background-color: #ffffff;
        }

        /* 单元格样式类 */
        .table-cell {
            padding: 10px;
            text-align: left;
        }

        /* 标签样式类 */
        .label-bold {
            font-weight: bold;
        }

        /* 文本框样式类 */
        .text-input {
            width: 200px;
            padding: 8px;
            margin: 5px 0 10px 0;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        /* 入库按钮的样式 */
        .comic-button {
            display: inline-block;
            padding: 10px 20px;
            font-size: 24px;
            font-weight: bold;
            text-align: center;
            text-decoration: none;
            color: #fff;
            background-color: #ff5252;
            border: 2px solid #000;
            border-radius: 10px;
            box-shadow: 5px 5px 0px #000;
            transition: all 0.3s ease;
            cursor: pointer;
            justify-content: center;
        }

            .comic-button:hover {
                background-color: #fff;
                color: #ff5252;
                border: 2px solid #ff5252;
                box-shadow: 5px 5px 0px #ff5252;
            }

            .comic-button:active {
                background-color: #fcf414;
                box-shadow: none;
                transform: translateY(4px);
            }

        .comic-button {
            background-color: #4CAF50; /* Green */
            color: white;
            padding: 10px 20px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            cursor: pointer;
            border: none;
            border-radius: 4px;
        }

            .comic-button:hover {
                background-color: #45a049;
            }
        /*出库按钮样式*/
        .outputbtn {
            background: #fbca1f;
            font-family: inherit;
            padding: 0.6em 1.3em;
            font-weight: 900;
            font-size: 18px;
            border: 3px solid black;
            border-radius: 0.4em;
            box-shadow: 0.1em 0.1em;
            cursor: pointer;
        }

            .outputbtn:hover {
                transform: translate(-0.05em, -0.05em);
                box-shadow: 0.15em 0.15em;
            }

            .outputbtn:active {
                transform: translate(0.05em, 0.05em);
                box-shadow: 0.05em 0.05em;
            }
    </style>
</head>
<body>
    <form runat="server">
        <div id="one">
            <%--第一部分--%>
            <div id="logo">
                <img src="../Image/学校.png" alt="Alternate Text" class="menu-toggle" style="margin: 10px; width: 50px; height: 50px; float: left;" />
                <h3 style="margin-top: 22px; font-size: 20px; float: left;">高校资产管理系统</h3>
            </div>
            <div id="daohang" runat="server">
                <%--导航面板--%>

                <ul style="float: right; list-style-type: none; width: 400px;" runat="server">
                    <li></li>
                    <li style="margin-top: 6px;"><a href="../ChangePwd.aspx" class="Topstatus">修改密码</a></li>
                    <li style="margin-top: 6px;"><a href="../GetPwd.aspx" class="Topstatus">找回密码</a></li>
                    <li style="margin-top: 6px;"><a href="../MyUAMSWeb.aspx" class="Topstatus">退出登录</a></li>

                </ul>
            </div>
        </div>



        <hr align="left" size="3px" color="gray" width="920px" style="width: 100%;" />
        <%--状态栏--%>
        <div id="status">

            <asp:Label ID="lblProErr" runat="server"></asp:Label>
            <asp:Label ID="username" runat="server"></asp:Label>
        </div>


        <nav class="menus">
            <%--侧边栏--%>
            <ul>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/MyWork.aspx" style="text-decoration: none;">我的业务</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/InsertAsset.aspx" style="text-decoration: none;">计入资产</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/AssetCategory.aspx">计入类别</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../MaintenanceMgm/AllMaintenance.aspx">维修申请</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/UpdataAmount.aspx">库存管理</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/AssetBR.aspx" >资产借还管理</a>
                </li>
            </ul>
        </nav>
        <div class="content" style="border-radius: 10px; position: absolute; top: 15%; left: 13%;">
            <%--主要内容--%>
            <asp:GridView ID="dgvAsset" runat="server" AutoGenerateColumns="False" Width="1000px" Height="600px" BackColor="White" CssClass="asset-gridview" >
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkChoice" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle Width="40px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Aid" HeaderText="资产编码">
                        <HeaderStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Aname" HeaderText="资产名称">
                        <HeaderStyle Width="70px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="资产类别">
                        <ItemTemplate>
                            <asp:Label ID="lblCategory" runat="server" Text='<%# GetCategoryName(Eval("Tid")) %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="70px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Aamount" HeaderText="数额">
                        <HeaderStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Unit" HeaderText="计量单位">
                        <HeaderStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Describe" HeaderText="描述">
                        <HeaderStyle Width="300px" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>

        </div>
        <asp:Button ID="return" runat="server" Text="返回" OnClick="return_Click" CssClass="returnbutton" CausesValidation="false" />


        <asp:TextBox ID="txtSearch" runat="server" CssClass="Search" AutoPostBack="true"></asp:TextBox>
        <asp:Button ID="SearchBtn" runat="server" Text="搜索" CssClass="btn" OnClick="Search_Asset" />
        <div style="position: absolute; top: 20%; left: 75%;">
            <table class="table-form">
                <tr class="table-row">
                    <td class="table-cell">
                        <asp:Label ID="Label1" runat="server" Text="凭证ID:" CssClass="label-bold"></asp:Label>
                    </td>
                    <td class="table-cell">
                        <asp:TextBox ID="txtVid" runat="server" CssClass="text-input"></asp:TextBox>
                    </td>
                </tr>
                <tr class="table-row table-row-alt">
                    <td class="table-cell">
                        <asp:Label ID="Label2" runat="server" Text="数额:" CssClass="label-bold"></asp:Label>
                    </td>
                    <td class="table-cell">
                        <asp:TextBox ID="txtAmount" runat="server" CssClass="text-input"></asp:TextBox>
                    </td>
                </tr>
                <tr class="table-row">
                    <td class="table-cell">
                        <asp:Label ID="Label3" runat="server" Text="备注:" CssClass="label-bold"></asp:Label>
                    </td>
                    <td class="table-cell">
                        <asp:TextBox ID="txtRemark" runat="server" CssClass="text-input" TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
                <tr class="table-row table-row-alt">
                    <td class="table-cell" style="text-align: center; vertical-align: middle">
                        <asp:Button ID="btnIntput" runat="server" Text="入库" CssClass="comic-button" OnClick="btnIntput_Click" />
                    </td>
                    <td class="table-cell" style="text-align: center; vertical-align: middle">
                        <asp:Button ID="btnOutput" runat="server" Text="出库" CssClass="outputbtn" OnClick="btnOutput_Click" />
                    </td>
                </tr>
            </table>

        </div>

    </form>
    <script src="Scripts/MyWork.js"></script>
    <script>
        // 获取侧边栏和图片按钮元素
        var sidebar = document.querySelector('.menus');
        var menuToggle = document.querySelector('.menu-toggle');

        // 为图片按钮添加点击事件
        menuToggle.addEventListener('click', function () {
            // 切换侧边栏的显示和隐藏
            var sidebarStyle = sidebar.style;
            if (sidebarStyle.left === '-200px') {
                sidebarStyle.left = '0';
            } else {
                sidebarStyle.left = '-200px';
            }
        });
        
    </script>


</body>
</html>
